package com.xiege.springboot.mapper;

import com.xiege.springboot.entity.Collection;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author 榭歌
 * @since 2023-04-02
 */
public interface CollectionMapper extends BaseMapper<Collection> {

    //文章收藏数
    @Select("select count(*) FROM collection where article_id={article_id}")
    int findArticleSum(Integer article_id);


}
